home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / SpeakFreely / src / types.h < prev    next >
C/C++ Source or Header  |  2000-05-18  |  1KB  |  54 lines

  1. #ifndef __types_h
  2. #define __types_h
  3. #include <limits.h>
  4. #include <sys/types.h>
  5.  
  6. #ifndef TRUE
  7. #define TRUE (1)
  8. #define FALSE (0)
  9. #endif
  10.  
  11. typedef unsigned char boolean;
  12.  
  13. #ifdef __STDC__
  14. #define MAX32U 0xFFFFFFFFU
  15. #else
  16. #define MAX32U 0xFFFFFFFF
  17. #endif
  18. #define MAX32  0x8FFFFFFF
  19.  
  20. /* 32 bit machines */
  21. #if ULONG_MAX == MAX32U
  22. typedef short int16;
  23. typedef int   int32;
  24. /* Kludge if we can't get 64-bit integers. */
  25. #ifndef NOLONGLONG
  26. typedef long long int int64;
  27. #else
  28. typedef long int int64;
  29. #endif
  30. typedef unsigned long  u_int32;
  31. typedef unsigned short u_int16;
  32. #ifndef NOLONGLONG
  33. typedef unsigned long long u_int64;
  34. #else
  35. typedef unsigned long u_int64;
  36. #endif
  37. /* 16 bit machines */
  38. #elif ULONG_MAX == 0xFFFF
  39. typedef int  int16;
  40. typedef long int32;
  41. typedef unsigned long  u_int32;
  42. typedef unsigned int   u_int16; 
  43. /* 64 bit machines */
  44. #else
  45. typedef short int16;
  46. typedef int   int32;
  47. typedef unsigned int   u_int32;
  48. typedef unsigned short u_int16;
  49. #endif
  50. typedef char int8;
  51. typedef unsigned char u_int8;
  52.  
  53. #endif
  54.